<?php
namespace app\agent\controller;
use think\Controller;
use think\Db;
use think\request;
use app\common\controller\AgentBaseController;

class Helps extends AgentBaseController
{
	//帮助列表
    public function helps()
    {
    	if(input("pid")){
    		$pid=input('pid');
    	}else{
    		$pid='1,2,3,4,5,6';
    	}
    	$list = Db::name('sys_helps')->where('pid in ('.$pid.')')->order('add_time desc')->paginate(15);
        $this->assign('list',$list);
        $this->assign('empty','<span class="empty">没有数据</span>');
    	return $this->fetch();
    }
    //帮助详情
    public function helps_show()
    {
    	$id=input('id');
    	$data = Db::name('sys_helps')->where('id',$id)->find();
    	$this->assign('data',$data);
    	return $this->fetch();
    }
    
    
    //更新日志
    public function iteration()
    {
    	$list = Db::name('sys_iteration')->order('add_time desc')->select();
        $this->assign('list',$list);
        $this->assign('empty','<span class="empty">没有数据</span>');
    	return $this->fetch();
    }
    
    
    //平台公告OEM发布
    public function notice()
    {
    	$list = Db::name('sys_notice')->where('oem_id',session('oem_id'))->order('add_time desc')->paginate(15);
        $this->assign('list',$list);
        $this->assign('empty','<span class="empty">没有数据</span>');
    	return $this->fetch();
    }
    //平台公告详情
    public function notice_show()
    {
    	$id=input('id');
    	$data = Db::name('sys_notice')->where('id',$id)->find();
    	$this->assign('data',$data);
    	return $this->fetch();
    }
    
}
